package com.qf.service.impl;

import com.qf.dao.TbTeacherDao;
import com.qf.pojo.TbTeacher;
import com.qf.pojo.TbTeacherExample;
import com.qf.service.TeacherService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * created by 赵文韬 on 2022/8/12 21:25
 */
@Service
public class TeacherServiceImpl implements TeacherService {
    @Resource
    private TbTeacherDao tbTeacherDao;
    @Override
    public List<TbTeacher> selectTeacher(String name) {
        TbTeacherExample tbTeacherExample = new TbTeacherExample();
        TbTeacherExample.Criteria criteria = tbTeacherExample.createCriteria();
        criteria.andNameEqualTo(name);
        List<TbTeacher> tbTeachers = tbTeacherDao.selectByExample(tbTeacherExample);
        return tbTeachers;
    }

    @Override
    public int insertTeacher(TbTeacher tbTeacher) {
        return 0;
    }
}
